<?php

/**
* @desc 表单模型层基类
* @author kevin.wang
* @date 2015-01-01 12:00:00
**/
class BaseForm extends CFormModel
{
	//订单号生成
	protected function getOrderSn(){
		return intval(microtime(true)*10000).uniqid();
	}
	//密码加密方法
	protected function encryPasswd($password){
		return sha1($password);
	}
	//生成goods_sn
	protected function getGoodsSn(){
		$pre = Yii::app()->params['goods_pre'];
		return $pre.(microtime(true)*10000);
	}
}
